import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { FindPage } from '../pages/find/find';
import { IonicNativePage } from '../pages/ionic-native/ionic-native';
import { HomePage } from '../pages/home/home';
import { SlidingItemPage } from '../pages/sliding-list/sliding-item';
import { SettingsListPage } from '../pages/settings/settings';
import { TabsPage } from '../pages/tabs/tabs';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

import { ToastService } from '../provider/toast.service';
import { AlertService } from '../provider/alert.service';


// Ionic native providers
import { Camera } from '@ionic-native/camera';
import { BarcodeScanner } from '@ionic-native/barcode-scanner';
import { Diagnostic } from '@ionic-native/diagnostic';

import { NativePageTransitions } from '@ionic-native/native-page-transitions';

import { CameraProvider } from '../provider/camera.provider';

import { ComponentsModule } from '../components/components.module';


@NgModule({
  declarations: [
    MyApp,
    FindPage,
    IonicNativePage,
    SlidingItemPage,
    HomePage,
    SettingsListPage,
    TabsPage
  ],
  imports: [
    BrowserModule,
    ComponentsModule,
    IonicModule.forRoot(MyApp, {
      tabsHideOnSubPages: true
    })
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    FindPage,
    IonicNativePage,
    SlidingItemPage,
    HomePage,
    SettingsListPage,
    TabsPage
  ],
  providers: [
    CameraProvider,
    BarcodeScanner,
    Camera,
    ToastService,
    AlertService,
    NativePageTransitions,
    Diagnostic,  
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {
}
